package com.itheima.entity;

import com.hzheima.util.ImageUtil;

import java.awt.*;
import java.awt.image.BufferedImage;

public class Bullet extends FIyingObject {
    private int speed;//子弹移动速度

    public Bullet(int px, int py) {
        img = ImageUtil.getImg("fire.png");
        width = img.getWidth();
        height = img.getHeight();
        x = px + 25;
        y = py - 65;
        speed = 10;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public void move() {
        this.y -= speed;
    }
}
